<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="<%=request.getContextPath()%>/HRTWEB/js/jquery-1.9.1.js"></script>
<script
	src="<%=request.getContextPath()%>/HRTWEB/personalCenter/manageAddress.js"></script>
<script src="<%=request.getContextPath()%>/HRTWEB/address/Area.js"
	type="text/javascript"></script>
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/HTRWEB/css/publicCss.css">
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/HRTWEB/personalCenter/personalCss.css">
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/HRTWEB/css/changeAddress.css">
<!-- 表单验证 -->
<script type="text/javascript"
	src="<%=request.getContextPath()%>/HRTWEB/js/validforms/Validform_v5.3.2.js"></script>
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/HRTWEB/css/Validform_css.css" />
<title>地址管理</title>
</head>
<body>
	<div class="centerTable">
		<div>我的地址</div>
		<table style="border: 1px solid #999" cellspacing="0" cellpadding="0">
			<tr>
               <td>
					<div class="inner" id="inner">
						<ul>
							<c:forEach var="address" items="${addressList}">
								<li>
									<div class="innerDIV" id="address${address.id}"
										isselected="false" objId="${address.id}">
										<div style="height: 20px">
											<span>${address.province}</span> <span>${address.city}</span>
											<span>(</span> <span>${address.receiver}收</span> <span>)</span>
										</div>
										<div style="height: 50px">
											<span>${address.area}</span> <span>${address.address}</span>
											<span>${address.mobile}</span>
										</div>
										<div style="height: 20pxvertical-align:bottom;">
											<a href="javascript:;" class="m-l-x" id="editBtn" data-toggle="modal"
												memberId="${HRTMember.id}" addressId="${address.id}">修改</a>
											<a href="javascript:;" class="m-l-x" id="deleteBtn" data-toggle="modal"
												memberId="${HRTMember.id}" addressId="${address.id}">删除</a>
											<a href="javascript:;" class="m-l-x" id="setDefaultBtn"
												addressId="${address.id}" memberId="${HRTMember.id}">设为默认</a>
										</div>
									</div>
								</li>
								<div class="clearFloat"></div>
							</c:forEach>
						</ul>
					</div>
				</td>
			</tr>
		</table>
	</div>
	<div align="center">
        <div class="changeAddress">
			<h4 id="myModalLabel">编辑新地址</h4>
			<form action="<%=request.getContextPath()%>/HRTWEB/address/save.do" id="addressInfor" name="addressInfor"
				class="addressInfor">
				<div class="centerTable">
					<table>
						<tr>
							<td colspan="2"><input type="hidden" value="${HRTMember.id}"
								name="memberId" id="memberId" />
								<div>新增收货地址 电话号码、手机号选填一项,其余均为必填项</div></td>
						</tr>
						<tr>
						    <td >
								所在地区:
							</td>
							<td colspan="2">
							    <div class="getAdress">
									<select id="seachprov" name="seachprov" onChange="changeComplexProvince(this.value);"></select>&nbsp;&nbsp;
									<select id="seachcity" name="homecity" onChange="changeCity(this.value);"></select>&nbsp;&nbsp; 
									<span id="seachdistrict_div"><select id="seachdistrict" name="seachdistrict" onChange="changeArea(this.value);"></select></span>
								</div>
							</td>	
						</tr>
						<tr>
							<td colspan="2">
									<input type="hidden" id="province" name="province"> 
									<input type="hidden" id="city" name="city">
								    <input type="hidden" id="area" name="area">
							</td>
						</tr>
						<tr>
							<td>
							    <span style="vertical-align: top;color:#333;">详细地址:</span>
							</td>
							<td colspan="2">
								<textarea name="address" id="address" rows="1" overflow-y="scroll" cols="3"></textarea>
							</td>
						</tr>
						<tr>
						    <td>
								邮政编码:
							</td>
							<td>
								<input id="postCode" name="postCode" type="text" class="inputxt Validform_error" datatype="p" errormsg="邮政编码格式错误" nullmsg="请填写信息！" />
								
							</td>
						</tr>
						<tr>
							<td>
								 收货人姓名:
							</td>
							<td>
							    <input id="receiver" name="receiver" type="text" class="inputxt Validform_error" datatype="*6-16" errormsg="收货人姓名填写错误" nullmsg="请填写信息！"/>
							</td>
							<td><div class="Validform_checktip fontSize">请输入收货人姓名</div></td>
						</tr>
						<tr>
						     <td>
				           		手机号码:
							</td>
							<td>
							    <input id="mobile" name="mobile" type="text" class="inputxt Validform_error" datatype="m" errormsg="手机号码填写错误" nullmsg="请填写信息！"/>
							</td>
							<td><div class="Validform_checktip fontSize">请输入手机号码</div></td>
						</tr>
						<tr>
							<td>
								电话号码:
							</td>
							<td>
								<input id="telPhone" name="telPhone" type="text"
										 class="inputxt Validform_error" datatype="n" errormsg="电话号码填写电话号码" nullmsg="请填写信息！"/>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<div class="m-l-x">
									<input style="width: 20px; height: 16px;" type="checkbox"
										name="temp" id="temp" /><span style="vertical-align: top;color:#333;">设置为默认收货地址</span>
								</div>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<div id="optBtn" style="text-align: center">
									<button type="submit" class="btn btn-default">保存</button>
									<button type="button" class="btn btn-default" id="closeBtn"
										name="closeBtn">取消</button>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
	</div>
</body>
</html>